package com.zmn.oms.persistence.interfaces.xno;

import com.zmn.oms.model.entity.xno.OrderXnoBind;
import com.zmn.oms.model.entity.xno.OrderXnoBindQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 类描述：
 *
 * @author ligang
 * @since 2022/01/11 16:08
 */
public interface OrderXnoBindDao {

    /**
     * 根据订单Id查询订单标记数量
     *
     * @param orderId
     * @return
     */
    Integer countOrderXnoBindByOrderId(Long orderId);

    /**
     * 根据工单集合查询小号绑定
     *
     * @param workIdList
     * @param bindType
     * @return
     */
    List<OrderXnoBind> queryOrderXnoBindByWorkIdList(@Param("workIdList") List<Long> workIdList, @Param("bindType") int bindType);

    /**
     * 新增绑定
     *
     * @param orderXnoBind
     * @return
     */
    Integer insertOrderXnoBind(OrderXnoBind orderXnoBind);

    /**
     * 修改绑定
     *
     * @param orderXnoBind
     * @return
     */
    Integer updateOrderXnoBind(OrderXnoBind orderXnoBind);

    /**
     * 查询小号绑定数量
     *
     * @param orderXnoBindQuery
     * @return
     */
    Integer countXnoBindByQuery(OrderXnoBindQuery orderXnoBindQuery);

    /**
     * 查询小号绑定
     *
     * @param orderXnoBindQuery
     * @return
     */
    OrderXnoBind queryOrderXnoBindByQuery(OrderXnoBindQuery orderXnoBindQuery);

    /**
     * 查询小号绑定集合
     *
     * @param xnoBindQuery
     * @return
     */
    List<OrderXnoBind> queryOrderXnoBindListByQuery(OrderXnoBindQuery xnoBindQuery);
}
